<?PHP
$str1 = "alert('Nieprawidłowe dane.');";
$str2 = "alert('Kod pierwszej funkcji.');";
$str3 = "alert('Kod drugiej funkcji.');";

if(isSet($_GET['id'])){
  $id = $_GET['id'];
  if($id == 1){
    echo $str2;
  }
  else if($id == 2){
    echo $str3;
  }
  else{
    echo $str1;
  }
}
else{
  echo $str1;
}

?>